﻿Imports SS
Imports SS.Databases
Imports SS.Databases.Connecter
Imports SS.ApplicationBlock

Public Class Province

	Public Shared Function AllProvince() As List(Of Entity.ProvinceItem)

		Using connOraSelect As New DBOracle(Common.Utility.ConnectString, False)
			Dim dt As DataTable = connOraSelect.GetDataTable("Select * from " & Common.Utility.Schema & ".RNW_VW_PROVINCE", "Province")
			If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
				Dim objReturn As List(Of Entity.ProvinceItem)
				objReturn = New List(Of Entity.ProvinceItem)
				objReturn = SS.ORM.Broker.RetrieveInstance(Of Entity.ProvinceItem)(dt)
				Return objReturn
			Else
				Return Nothing
			End If
		End Using

	End Function

End Class
